﻿// Video.cs
using System.Security.Principal;

[DisplayName("视频管理模块")]
public class Video : EntityBase
{
    [Required]
    [Key]
    [MaxLength(50)]
    [DisplayName("视频ID")]
    public string VideoId { get; set; }

    [Required]
    [MaxLength(50)]
    [DisplayName("帐号ID")]
    public string AccountId { get; set; }

    [Required]
    [MaxLength(255)]
    [DisplayName("视频标题")]
    public string Title { get; set; }

    [MaxLength(1000)]
    [DisplayName("视频说明")]
    public string Description { get; set; }

    [Required]
    [MaxLength(255)]
    [DisplayName("视频文件路径")]
    public string FilePath { get; set; }

    [MaxLength(255)]
    [DisplayName("视频缩略图")]
    public string Thumbnail { get; set; }


    [DisplayName("视频标签")]
    public string Tags { get; set; }


    [DisplayName("视频元数据")]
    public string Metadata { get; set; }


    [DisplayName("视频时长")]
    public int? Duration { get; set; } // 秒数


    [DisplayName("视频观看人数")]
    public int? Views { get; set; }


    [DisplayName("视频观看喜欢数")]
    public int? Likes { get; set; }


    [DisplayName("视频评论数")]
    public int? Comments { get; set; }


    [DisplayName("视频分享数")]
    public int? Shares { get; set; }

    [Required]
    [DisplayName("视频状态")]
    public VideoStatus Status { get; set; } = VideoStatus.Draft;

    [Required]
    [DisplayName("视频创建时间")]
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    [DisplayName("视频发布时间")]
    public DateTime? PublishedAt { get; set; }

    public virtual Account Account { get; set; }
}

public enum VideoStatus
{
    Draft = 0,
    Uploaded = 1,
    Processing = 2,
    Published = 3,
    Failed = 4,
    Deleted = 5
}